home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / e / exit_13 / exit13.dms / exit13.adf / Source / exit-13_macros.i < prev    next >
Text File  |  1993-02-13  |  3KB  |  127 lines

  1. ;========]  dos.library offsets      [==============================
  2. Open        equ    -$001E    (name,accessMode)(D1/D2)
  3. Close        equ    -$0024    (file)(D1)
  4. Read        equ    -$002A    (file,buffer,length)(D1/D2/D3)
  5. Write        equ    -$0030    (file,buffer,length)(D1/D2/D3)
  6. Output        equ    -$003C    ()
  7.  
  8. ;========]  exec.library offsets      [=============================
  9. Forbid        equ    -$0084    ()
  10. Permit        equ    -$008A    ()
  11. CloseLibrary    equ    -$019E    (library)(A1)
  12. OpenLibrary    equ    -$0228    (libName,version)(A1,D0)
  13.  
  14. ;========]  graphics.library offsets  [=============================
  15. ClearScreen    equ    -$0030    (rastPort)(A1)
  16. SetFont        equ    -$0042    (RastPortID,textFont)(A1,A0)
  17. ScrollRaster    equ    -$018C    (rastPort,dX,dY,minx,miny,maxx,maxy)(A1,D0/D1/D2/D3/D4/D5)
  18. FreeSprite    equ    -$019E    (num)(d0)
  19.  
  20. ;=======] intuition.library offsets   [=============================
  21. CloseScreen    equ    -$0042    (Screen)(A0)
  22. CloseWindow    equ    -$0048    (Window)(A0)
  23. DisplayAlert    equ    -$005A    (AlertNumber,String,Height)(D0/A0,D1)
  24. OpenScreen    equ    -$00C6    (OSargs)(A0)
  25. OpenWindow    equ    -$00CC    (OWargs)(A0)
  26. PrintIText    equ    -$00D8    (rp,itext,left,top)(A0/A1,D0/D1)
  27.  
  28. ;=======] diskfont.library offsets    [=============================
  29. OpenDiskFont    equ    -$001E    (textAttr)(A0)
  30.  
  31.  
  32.   ;===============================================================; 
  33.   ; Macro fucntions used in Code                                  ; 
  34.   ;===============================================================;              
  35.  
  36. CALLDiskfont    macro
  37.         move.l        _DiskfontBase,a6
  38.         jsr        \1(a6)
  39.         endm
  40.         
  41. CALLDOS        macro
  42.         move.l        _DOSBase,a6
  43.         jsr        \1(a6)
  44.         endm
  45.  
  46. CALLEXEC    macro
  47.         move.l        (_SysBase),a6
  48.         jsr        \1(a6)
  49.         endm
  50.  
  51. CALLGRAF    macro
  52.         move.l        _GfxBase,a6
  53.         jsr        \1(a6)
  54.         endm
  55.         
  56.         
  57. CALLINT        macro
  58.         move.l        _IntuitionBase,a6
  59.         jsr        \1(a6)
  60.         endm
  61.         
  62.  
  63. OPENDiskfont    macro
  64.         lea        Diskfontname,a1
  65.         moveq.l        #0,d0
  66.         CALLEXEC    OpenLibrary
  67.         move.l        d0,_DiskfontBase
  68.         endm
  69.  
  70. OPENDOS        macro
  71.         lea        dosname,a1
  72.         moveq.l        #0,d0
  73.         CALLEXEC    OpenLibrary
  74.         move.l        d0,_DOSBase
  75.         endm
  76. OPENGRAPHICS    macro
  77.         lea        gfxname,a1
  78.         moveq.l        #0,d0
  79.         CALLEXEC    OpenLibrary
  80.         move.l        d0,_GfxBase
  81.         endm
  82. OPENINTUITION    macro
  83.         lea        intname,a1
  84.         moveq.l        #0,d0
  85.         CALLEXEC    OpenLibrary
  86.         move.l        d0,_IntuitionBase
  87.         endm
  88.  
  89. CLOSEDiskfont    macro
  90.         move.l        _DiskfontBase,a1
  91.         CALLEXEC    CloseLibrary
  92.         endm
  93.  
  94. CLOSEDOS    macro
  95.         move.l        _DOSBase,a1
  96.         CALLEXEC    CloseLibrary    
  97.         endm
  98.  
  99. CLOSEGRAPHICS    macro
  100.         move.l        _GfxBase,a1
  101.         CALLEXEC    CloseLibrary    
  102.         endm
  103.         
  104.         
  105. CLOSEINTUITION    macro
  106.         move.l        _IntuitionBase,a1
  107.         CALLEXEC    CloseLibrary    
  108.         endm
  109.         
  110.         
  111.         
  112. LIBNAMES    macro
  113. Diskfontname    dc.b        'diskfont.library',0
  114.         even
  115. _DiskfontBase    dc.l        0
  116. dosname        dc.b        'dos.library',0
  117.         even
  118. _DOSBase    dc.l        0
  119. gfxname        dc.b        'graphics.library',0
  120.         even
  121. _GfxBase    dc.l        0
  122. intname        dc.b        'intuition.library',0
  123.         even
  124. _IntuitionBase    dc.l        0
  125.         endm
  126.         
  127.